<template>
	<view >
		<scroll-view scroll-y class="scoll-y" :style="styleText" @scrolltolower="scrolltolower" 
		refresher-enabled :refresher-triggered="refresherBool" @refresherrefresh="handleRefresher">
			<view class="list">
					<slot></slot>
					<u-empty mode="list" v-if="!list.length" text="暂无数据">
					</u-empty>
			</view>
		</scroll-view>
	</view>
</template>

<script>
export default {
	props: {
		list: {
			type: Array,
			default: ()=>{
				return []
			}
		},
		styleText:{
			type: String,
			default: 'height:100vh',
		}
	},
	data() {
		return {
			refresherBool:false,
			
		};
	},
	methods: {
		handleRefresher(){
			this.refresherBool = true
			setTimeout(()=>{
				this.refresherBool = false
			},1000)
			this.$emit('handleRefresher')
		},
		scrolltolower(){
			this.$emit('scrolltolower')
		},
	},
};
</script>
<style lang="scss" scoped>
.list{
	
}






</style>
